import request from '@/utils/request'

// 查询工单分派改数据库标题版列表
export function listOrder(query) {
  return request({
    url: '/repair/order/list',
    method: 'get',
    params: query
  })
}

// 查询工单分派改数据库标题版详细
export function getOrder(repairId) {
  console.log("达到了getOrder，repairId的值是："+repairId);
  return request({
    url: '/repair/order/' + repairId,
    method: 'get'
  })
}
// 插入分派--找数据
export function getOrder01(repairId) {
console.log("达到了getOrder01，repairId的值是："+repairId);
  return request({
    url: '/repair/transfer/' + repairId,
    method: 'post'
  })
}

// 新增工单分派改数据库标题版
export function addOrder(data) {
  return request({
    url: '/repair/order',
    method: 'post',
    data: data
  })
}

// 修改工单分派改数据库标题版
export function updateOrder(data) {
  return request({
    url: '/repair/transfer',
    method: 'post',
    data: data
  })
}
// export function updateOrder(data) {
//   return request({
//     url: '/repair/order',
//     method: 'put',
//     data: data
//   })
// }

// 删除工单分派改数据库标题版
export function delOrder(repairId) {
  return request({
    url: '/repair/order/' + repairId,
    method: 'delete'
  })
}


export function findDetails(data) {
  return request({
    url: '/detailsOrder/find/'+data,
    method: 'post',
    data: null,
  })
}

